<!DOCTYPE>
<html>
<head>
  <title>Q.window | QLib | Powered By PHPKIND</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <!-- 使用QLib控件是必须包含样式表 -->
  <link type="text/css" rel="stylesheet" href="../ui.css" />
  <!--  
  提示：src="{QLib目录}/Q.js" 
  根据实际存放路径， 测试代码都是在QLib目录的samples文件夹下，所以这里用的是"../Q.js" 
  -->
  <script type="text/javascript" src="../Q.js">
  <!--
  // 需要加载额外库时
  import utils.stl;
  import utils.xml;
  import ui.drag;
  import ui.contextmenu;
  import ui.wndx-1-0-2;
  -->
  </script>

  <script>
  <!--
  var g_test_window;
  var g_test_dialog;
  var g_multi_window;
  Q.Ready(function() {
    //Q.debug(true);
    //Q.setdebug(Q.$('debug_window'));
    // 提示对话框
    Q.$('btnOpenMessageBox').onclick = function() {
      g_test_dialog = new Q.Dialog({
        title: "提示窗口提示窗口提示窗口提示窗口提示窗口提示窗口提示窗口提示窗口提示窗口提示窗口提示窗口提示窗口提示窗口提示窗口提示窗口提示窗口",
        content: Q.$('test-domodal'),
        onok : function() { return true; }
      });

      g_test_dialog.domodal($GetDesktopWindow());
      g_test_dialog.set_zindex(100001);
    }

    Q.$('btnOpenWindow').onclick = function() {
      //g_test_window = new Q.Window({width:480, height:370, wstyle: "q-attr-no-icon|q-attr-with-bottom|q-attr-fixed|q-attr-no-max|q-attr-no-min"});
      g_test_window = new Q.Window({width:480, height:370, wstyle: "q-attr-no-icon|q-attr-wit1h-bottom|q-attr-fixed"});
      g_test_window.show(true);
      g_test_window.set_content(Q.$('progress'));
      //g_test_window.adjust();
      g_test_window.center();
    }
  
    Q.$('btnOpenMultiWindow').onclick = function() {
      g_multi_window = new Q.Window({title: "multiwindow 1", width:480, height:370});
      g_multi_window.show(true);
      g_multi_window.center();
      
      var sub1 = new Q.Window({title: "child 1", width: 100, height:100, parent: g_multi_window, wstyle: CONST.STYLE_CHILD})
      var sub2 = new Q.Window({title: "child 2", width: 100, height:100, parent: g_multi_window, wstyle: CONST.STYLE_CHILD})
      var sub3 = new Q.Window({title: "child popup", width: 100, height:100, parent: g_multi_window})
    
      sub1.show(true);
      sub2.show(true);
      sub3.show(true);
    }

    Q.$('test-domodal').onclick = function() {
      new Q.MessageBox({
        parent: g_test_dialog,
        title: "test",
        content: 'test-domodal',
        onok : function() { return true; }
      });
    }

    Q.$('btnClear').onclick=function() {
      Q.$('debug_window').innerHTML = '';
    }
  });
  
  -->
  </script>
</head>
<body onselectstart="return false;" style=" background: #CCC;height: 100%;overflow:hidden;-moz-user-select:none;-webkit-user-select: none;">

<p>提示对话框</p>
<button id="btnClear">Clear</button>
<button id="btnOpenWindow">Window</button>
<button id="btnOpenMultiWindow">MultiWindow</button>
<button id="btnOpenMessageBox">MessageBox</button>
<!-- wndx template
<embed id="flash" style="display:none;" pluginspage='http://www.macromedia.com/go/getflashplayer' src='http://you.video.sina.com.cn/api/sinawebApi/outplayrefer.php/vid=3685396_1292548084_ah21RiZsBjPK+l1lHz2stqkP7KQNt6nki2O2vlasJQZdQ0/XM5GaZNUC4yDQFokbpWFOQpA6dvcg/s.swf' type='application/x-shockwave-flash' name='sinaplayer' allowFullScreen='true' allowScriptAccess='always' width='480' height='370' wmode='transparent'></embed-->

<button id="test-domodal" style="display:none;">DoModal</button>
<!-- wndx template -->
<br>

<div id='debug_window' style='width:100%;height: 300px;overflow: auto;'>

</div>

<div __qwindow__="" class="q-window undefined q-attr-fixed q-attr-no-min q-attr-no-max q-attr-with-bottom" style="top: 143px; left: 214px; width: 600px; height: 400px; display: none;" q-drag-object="true">
  <div class="q-title">
    <div class="q-icon"></div>
    <div class="q-title-content">提示窗口提示窗口提示窗口提示窗口提示窗口提示窗口提示窗口提示窗口提示窗口提示窗口提示窗口提示窗口提示窗口提示窗口提示窗口提示窗口</div>
    <button class="q-padding">&nbsp;</button>
    <button class="q-close">&nbsp;</button>
    <button class="q-max">&nbsp;</button>
    <button class="q-min">&nbsp;</button>
  </div>
  <div class="q-window-client">
    <button id="test-domodal">DoModal</button>
  </div>
  <div class="q-bottom-bar"></div>
  <div class="q-window-mask alpha_1" style="display: none;"></div>
</div>


<div id="progress" style="background: red; height: 40px; line-height: 40px; ">
  <button style="margin: 12px 0 0 0; padding:0; background:none; height: 16px;border-width:0;background:blue;">test</button>
</div>




</body>
</html>
